STEP 6: Let's have this function return the value of moon_weight.

The Python keyword return creates a return statement and causes a function to exit. A return statement allows a value created inside a function to be used outside of the function.

  • Go to and drag Return Statement inside the function so that it has a ···· in front of it.
  • Change the variable in the return statement to moon_weight.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)